﻿using System.Collections.Generic;

namespace OperationPlugins.Models
{
    /// <summary>
    /// Represents method parameters.
    /// </summary>
    public sealed class MethodParameters
    {
        private readonly Dictionary<string, object> _parameters = new Dictionary<string, object>();

        /// <summary>
        /// Gets or sets the method parameter by its name.
        /// </summary>
        /// <param name="parameterName">The method parameter name.</param>
        /// <returns>The method parameter value.</returns>
        public object this[string parameterName]
        {
            set { _parameters[parameterName] = value; }
            get { return _parameters[parameterName]; }
        }

        /// <summary>
        /// Gets all method parameters.
        /// </summary>
        public Dictionary<string, object> Parameters
        {
            get { return _parameters; }
        }
    }
}